package com.chaofan.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.PastOrPresent;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author 李超凡
 * @since 2022/1/14 13:05
 */
@Data
@TableName("t_user")
public class User {

    @TableId(type = IdType.AUTO)
    private Long id;

    @Size(min = 11, max = 11)
    @NotBlank
    private String phone;

    @Email
    private String email;

    private String password;

    private String salt;

    @PastOrPresent
    private Date createTime;

    @PastOrPresent
    private Date updateTime;

    private UserInfo userInfo;
}
